package com.bytedance.retrofit2;

import com.bytedance.retrofit2.client.Client;
import com.bytedance.retrofit2.http.Query;
import com.bytedance.retrofit2.http.Url;
import com.bytedance.retrofit2.mime.TypedInput;

import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.net.URI;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public final class ServiceMethod<T> {
    static final Pattern PARAM_URL_REGEX = Pattern.compile("\\{([a-zA-Z][a-zA-Z0-9_-]*)\\}");
    static final Pattern PARAM_NAME_REGEX = Pattern.compile("[a-zA-Z][a-zA-Z0-9_-]*");

    public final PriorityLevel priorityLevel;
    public final boolean isStreaming;
    final Client.Provider clientProvider;
    final CallAdapter<?> callAdapter;
    final RequestInterceptor requestInterceptor;
    final ResponseInterceptor responseInterceptor;
    final Executor httpExecutor;
    final int j;
    final boolean k;
    final Object l = null;
    final HttpUrl baseUrl;
    final Converter<TypedInput,T> responseConverter;
    final String httpMethod;
    final String relativeUrl;
    final boolean hasBody;
    final boolean isFormEncoded;
    final boolean isMultipart;
    final ParameterHandler<?>[] parameterHandlers;
    List headers;
    String contentType;

    ServiceMethod(Builder builder) {
        this.clientProvider = builder.retrofit.clientProvider;
        this.callAdapter = builder.callAdapter;
        this.requestInterceptor = builder.retrofit.requestInterceptor;
        this.responseInterceptor = builder.retrofit.responseInterceptor;
        this.httpExecutor = builder.retrofit.httpExecutor;
        this.baseUrl = builder.retrofit.baseUrl;
        this.responseConverter = builder.responseConverter;
        this.httpMethod = builder.httpMethod;
        this.relativeUrl = builder.relativeUrl;
        this.hasBody = builder.hasBody;
        this.isFormEncoded = builder.isFormEncoded;
        this.isMultipart = builder.isMultipart;
        this.parameterHandlers = builder.parameterHandlers;
        this.headers = builder.headers;
        this.contentType = builder.contentType;
        this.priorityLevel = builder.priorityLevel;
        this.isStreaming = builder.isStreaming;
        this.j = builder.g;
        this.k = builder.h;
    }

    static Class<?> boxIfPrimitive(Class<?> type) {
        if (Boolean.TYPE == type) {
            return Boolean.class;
        } else if (Byte.TYPE == type) {
            return Byte.class;
        } else if (Character.TYPE == type) {
            return Character.class;
        } else if (Double.TYPE == type) {
            return Double.class;
        } else if (Float.TYPE == type) {
            return Float.class;
        } else if (Integer.TYPE == type) {
            return Integer.class;
        } else if (Long.TYPE == type) {
            return Long.class;
        } else if (Short.TYPE == type) {
            return Short.class;
        }
        return type;
    }

    static Set<String> parsePathParameters(String arg3) {
        Matcher v0 = ServiceMethod.PARAM_URL_REGEX.matcher(arg3);
        LinkedHashSet v1 = new LinkedHashSet();
        while (v0.find()) {
            ((Set) v1).add(v0.group(1));
        }

        return v1;
    }

    static String b(String arg2) {
        Matcher v0 = ServiceMethod.PARAM_URL_REGEX.matcher(arg2);
        String v0_1 = v0.find() ? v0.group(1) : null;
        return v0_1;
    }

    static final class Builder<T> {
        final Retrofit retrofit;
        final Annotation[] methodAnnotations;
        final Annotation[][] parameterAnnotationsArray;
        final Type[] parameterTypes;
        PriorityLevel priorityLevel = PriorityLevel.NORMAL;
        boolean isStreaming = false;
        int g = -1;
        boolean h = true;
        boolean notNull = false;
        Type responseType;
        boolean gotField;
        boolean gotPart;
        boolean gotBody;
        boolean gotUrl;
        String httpMethod;
        boolean hasBody;
        boolean isFormEncoded;
        boolean isMultipart;
        String relativeUrl;
        List<com.bytedance.retrofit2.client.Header> headers;
        String contentType;
        ParameterHandler<?>[] parameterHandlers;
        Converter<DefaultCallAdapterFactory, T> responseConverter;
        CallAdapter<?> callAdapter;
        private boolean gotQuery;
        private boolean B;
        private Set relativeUrlParamNames;
        private String D;
        private java.lang.reflect.Method method;
        private boolean gotPath;

        public Builder(Retrofit retrofit, java.lang.reflect.Method method) {
            this.retrofit = retrofit;
            this.method = method;
            this.methodAnnotations = method.getAnnotations();
            this.parameterTypes = method.getGenericParameterTypes();
            this.parameterAnnotationsArray = method.getParameterAnnotations();
        }

        final CallAdapter<?> createCallAdapter() {
            Type returnType = this.method.getGenericReturnType();
            if (Utils.hasUnresolvableType(returnType)) {
                throw this.methodError(null, "Method return type must not include a type variable or wildcard: %s", new Object[]{returnType});
            }

            if (returnType == Void.TYPE) {
                throw this.methodError(null, "Service methods cannot return void.", new Object[0]);
            }

            Annotation[] annotations = this.method.getAnnotations();
            try {
                Retrofit retrofit = this.retrofit;
                Utils.checkNotNull(returnType, "returnType == null");
                Utils.checkNotNull(annotations, "annotations == null");
                int start = retrofit.adapterFactories.indexOf(null) + 1;
                int size = retrofit.adapterFactories.size();
                for (int i = start; i < size; ++i) {
                    CallAdapter<?> adapter = retrofit.adapterFactories.get(i).get(returnType);
                    if (adapter != null) {
                        return adapter;
                    }
                }
                StringBuilder sb = new StringBuilder("Could not locate call adapter for ").append(returnType).append(".\n");
                sb.append("  Tried:");
                size = retrofit.adapterFactories.size();
                while (start < size) {
                    sb.append("\n   * ").append(retrofit.adapterFactories.get(start).getClass().getName());
                    ++start;
                }
                throw new IllegalArgumentException(sb.toString());
            } catch (RuntimeException e) {
                e.printStackTrace();
                throw this.methodError(e, "Unable to create call adapter for %s", new Object[]{returnType});
            }
        }

        final RuntimeException methodError(Throwable throwable, String message, Object[] args) {
            return new IllegalArgumentException(String.format(message, args)
                    + "\n    for method " + this.method.getDeclaringClass().getSimpleName() + "." + this.method.getName(), throwable);
        }

        final void parseHttpMethodAndPath(String httpMethod, String value, boolean hasBody) {
            if (this.httpMethod != null) {
                throw this.methodError(null, "Only one HTTP method is allowed. Found: %s and %s.",
                        new Object[]{this.httpMethod, httpMethod});
            }

            this.httpMethod = httpMethod;
            if (httpMethod != null) {
                this.D = ServiceMethod.b(httpMethod);
            }

            if (this.D != null) {
                this.notNull = true;
            }

            this.hasBody = hasBody;
            if (!value.isEmpty()) {
                int question = value.indexOf(63);
                if (question != -1 && question < value.length() - 1) {
                    String queryParams = value.substring(question + 1);
                    if (ServiceMethod.PARAM_URL_REGEX.matcher(queryParams).find()) {
                        throw this.methodError(null, "URL query string \"%s\" must not have replace block. For dynamic query parameters use @Query.", new Object[]{queryParams});
                    }
                }

                this.relativeUrl = value;
                this.relativeUrlParamNames = ServiceMethod.parsePathParameters(value);
            }
        }

        final List parseHeaders(String[] arg8) {
            String v4;
            ArrayList v2 = new ArrayList();
            int v3 = arg8.length;
            int v0 = 0;
            while (true) {
                if (v0 >= v3) {
                    return v2;
                }

                v4 = arg8[v0];
                int v5 = v4.indexOf(58);
                if (v5 != -1 && v5 != 0 && v5 != v4.length() - 1) {
                    String v6 = v4.substring(0, v5);
                    v4 = v4.substring(v5 + 1).trim();
                    if ("Content-Type".equalsIgnoreCase(v6)) {
                        this.contentType = v4;
                    } else {
                        ((List) v2).add(new com.bytedance.retrofit2.client.Header(v6, v4));
                    }

                    ++v0;
                    continue;
                }

                break;
            }

            throw this.methodError(null, "@Headers value must be in the form \"Name: Value\". Found: \"%s\"", new Object[]{v4});
        }

        final RuntimeException parameterError(int arg3, String arg4, Object[] arg5) {
            return this.methodError(null, arg4 + " (parameter #" + (arg3 + 1) + ")", arg5);
        }

        final ParameterHandler parseParameter(int p, Type parameterType, Annotation[] annotations) {
            ParameterHandler v1 = null;
            int v4 = annotations.length;
            int v2 = 0;
            while (v2 < v4) {
                ParameterHandler v0 = this.parseParameterAnnotation(p, parameterType, annotations, annotations[v2]);
                if (v0 == null) {
                    v0 = v1;
                } else if (v1 != null) {
                    throw this.parameterError(p, "Multiple Retrofit annotations found, only one allowed.", new Object[0]);
                }

                ++v2;
                v1 = v0;
            }

            if (v1 == null) {
                throw this.parameterError(p, "No Retrofit annotation found.", new Object[0]);
            }
            return v1;
        }

        private ParameterHandler<?> parseParameterAnnotation(int p, Type type, Annotation[] annotations, Annotation annotation) {
            Converter v1_2;
            Type v1_1;
            Type v0_5;
            ParameterHandler v0_3;
            Class v0_2;
            boolean v2_2;
            Object[] v2_1;
            String v1;
            int v2 = 2;
            if (annotation instanceof Url) {
                if (this.gotUrl) {
                    throw this.parameterError(p, "Multiple @Url method annotations found.", new Object[0]);
                } else if (this.gotPath) {
                    throw this.parameterError(p, "@Path parameters may not be used with @Url.", new Object[0]);
                } else if (this.gotQuery) {
                    throw this.parameterError(p, "A @Url parameter must not come after a @Query", new Object[0]);
                } else if (this.relativeUrl != null) {
                    throw this.parameterError(p, "@Url cannot be used with @%s URL", new Object[]{this.httpMethod});
                } else {
                    this.gotUrl = true;
                    if (type != String.class
                            && type != URI.class
                            && (!(type instanceof Class) || !"android.net.Uri".equals(((Class) type).getName()))) {
                        throw this.parameterError(p, "@Url must be String, java.net.URI, or android.net.Uri type.", new Object[0]);
                    }
                    return new ParameterHandler.AndroidUriUrl();
                }
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.Path)) {
                if (this.gotQuery) {
                    throw this.parameterError(p, "A @Path parameter must not come after a @Query.", new Object[0]);
                }

                if (this.gotUrl) {
                    throw this.parameterError(p, "@Path parameters may not be used with @Url.", new Object[0]);
                }

                if (this.relativeUrl == null) {
                    throw this.parameterError(p, "@Path can only be used with relative url on @%s", new Object[]{this.httpMethod});
                }

                this.gotPath = true;
                String name = ((com.bytedance.retrofit2.http.Path) annotation).value();
                if (!ServiceMethod.PARAM_NAME_REGEX.matcher(name).matches()) {
                    Object[] objs = new Object[v2];
                    objs[0] = ServiceMethod.PARAM_URL_REGEX.pattern();
                    objs[1] = name;
                    throw this.parameterError(p, "@Path parameter name must match %s. Found: %s", objs);
                }

                if (!this.relativeUrlParamNames.contains(name)) {
                    Object[] objs = new Object[v2];
                    objs[0] = this.relativeUrl;
                    objs[1] = name;
                    throw this.parameterError(p, "URL \"%s\" does not contain \"{%s}\".", objs);
                }

                return new ParameterHandler.Path(name, this.retrofit.stringConverter(type, annotations), ((com.bytedance.retrofit2.http.Path) annotation).b());
            }

            if ((annotation instanceof Query)) {
                v1 = ((Query) annotation).a();
                v2_2 = ((Query) annotation).b();
                v0_2 = Utils.getRawType(type);
                this.gotQuery = true;
                if (Iterable.class.isAssignableFrom(v0_2)) {
                    if (!(type instanceof ParameterizedType)) {
                        throw this.parameterError(p, v0_2.getSimpleName() + " must include generic type (e.g., " + v0_2.getSimpleName() + "<String>)", new Object[0]);
                    }

                    return new ParameterHandler.m(v1, this.retrofit.stringConverter(Utils.getParameterUpperBound(0, ((ParameterizedType) type)), annotations), v2_2).iterable();
                }

                if (v0_2.isArray()) {
                    return new ParameterHandler.m(v1, this.retrofit.stringConverter(ServiceMethod.boxIfPrimitive(v0_2.getComponentType()), annotations), v2_2).array();
                }

                return new ParameterHandler.m(v1, this.retrofit.stringConverter(type, annotations), v2_2);
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.QueryMap)) {
                Class<?> rawParameterType = Utils.getRawType(type);
                if (!Map.class.isAssignableFrom(rawParameterType)) {
                    throw this.parameterError(p, "@QueryMap parameter type must be Map.", new Object[0]);
                }

                Type mapType = Utils.getSupertype(type, rawParameterType, Map.class);
                if (!(mapType instanceof ParameterizedType)) {
                    throw this.parameterError(p, "Map must include generic types (e.g., Map<String, String>)", new Object[0]);
                }

                Type keyType = Utils.getParameterUpperBound(0, ((ParameterizedType) mapType));
                if (String.class != keyType) {
                    throw this.parameterError(p, "@QueryMap keys must be of type String: " + keyType, new Object[0]);
                }

                Type valueType = Utils.getParameterUpperBound(1, ((ParameterizedType) mapType));
                Converter<?, String> valueConverter = this.retrofit.stringConverter(valueType, annotations);
                return new ParameterHandler.QueryMap(valueConverter, ((com.bytedance.retrofit2.http.QueryMap) annotation).encoded());
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.Header)) {
                String name = ((com.bytedance.retrofit2.http.Header) annotation).value();
                Class<?> rawParameterType = Utils.getRawType(type);
                if (Iterable.class.isAssignableFrom(rawParameterType)) {
                    if (!(type instanceof ParameterizedType)) {
                        throw this.parameterError(p, rawParameterType.getSimpleName() + " must include generic type (e.g., " + rawParameterType.getSimpleName() + "<String>)", new Object[0]);
                    }

                    Type iterableType = Utils.getParameterUpperBound(0, ((ParameterizedType) type));
                    Converter<?, String> converter = this.retrofit.stringConverter(iterableType, annotations);
                    return new ParameterHandler.Header(name, converter).iterable();
                }

                if (rawParameterType.isArray()) {
                    Class<?> arrayComponentType = ServiceMethod.boxIfPrimitive(rawParameterType.getComponentType());
                    Converter<?, String> converter = this.retrofit.stringConverter(arrayComponentType, annotations);
                    return new ParameterHandler.Header(name, converter).array();
                }

                return new ParameterHandler.Header(name, this.retrofit.stringConverter(type, annotations));
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.HeaderList)) {
                v0_2 = Utils.getRawType(type);
                if (!List.class.isAssignableFrom(v0_2)) {
                    throw this.parameterError(p, "@HeaderList parameter type must be List.", new Object[0]);
                }

                v0_5 = Utils.getSupertype(type, (Class<?>) v0_2, (Class<?>) List.class);
                if (!(v0_5 instanceof ParameterizedType)) {
                    throw this.parameterError(p, "List must include generic types (e.g., List<Header>)", new Object[0]);
                }

                v0_5 = Utils.getParameterUpperBound(0, ((ParameterizedType) v0_5));
                if (com.bytedance.retrofit2.client.Header.class != v0_5) {
                    throw this.parameterError(p, "@HeaderList keys must be of type retrofit.client.Header: " + v0_5, new Object[0]);
                }

                return new ParameterHandler.HeaderList(this.retrofit.c(v0_5, annotations));
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.Field)) {
                if (!this.isFormEncoded) {
                    throw this.parameterError(p, "@Field parameters can only be used with form encoding.", new Object[0]);
                }

                v1 = ((com.bytedance.retrofit2.http.Field) annotation).a();
                v2_2 = ((com.bytedance.retrofit2.http.Field) annotation).b();
                this.gotField = true;
                v0_2 = Utils.getRawType(type);
                if (Iterable.class.isAssignableFrom(v0_2)) {
                    if (!(type instanceof ParameterizedType)) {
                        throw this.parameterError(p, v0_2.getSimpleName() + " must include generic type (e.g., " + v0_2.getSimpleName() + "<String>)", new Object[0]);
                    }

                    return new ParameterHandler.Field(v1, this.retrofit.stringConverter(Utils.getParameterUpperBound(0, ((ParameterizedType) type)), annotations), v2_2).iterable();
                }

                if (v0_2.isArray()) {
                    return new ParameterHandler.Field(v1, this.retrofit.stringConverter(ServiceMethod.boxIfPrimitive(v0_2.getComponentType()), annotations), v2_2).array();
                }

                return new ParameterHandler.Field(v1, this.retrofit.stringConverter(type, annotations), v2_2);
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.FieldMap)) {
                if (!this.isFormEncoded) {
                    throw this.parameterError(p, "@FieldMap parameters can only be used with form encoding.", new Object[0]);
                }

                v0_2 = Utils.getRawType(type);
                if (!Map.class.isAssignableFrom(v0_2)) {
                    throw this.parameterError(p, "@FieldMap parameter type must be Map.", new Object[0]);
                }

                v0_5 = Utils.getSupertype(type, v0_2, Map.class);
                if (!(v0_5 instanceof ParameterizedType)) {
                    throw this.parameterError(p, "Map must include generic types (e.g., Map<String, String>)", new Object[0]);
                }

                v1_1 = Utils.getParameterUpperBound(0, ((ParameterizedType) v0_5));
                if (String.class != v1_1) {
                    throw this.parameterError(p, "@FieldMap keys must be of type String: " + v1_1, new Object[0]);
                }

                v1_2 = this.retrofit.stringConverter(Utils.getParameterUpperBound(1, ((ParameterizedType) v0_5)), annotations);
                this.gotField = true;
                return new ParameterHandler.FieldMap(v1_2, ((com.bytedance.retrofit2.http.FieldMap) annotation).a());
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.Part)) {
                if (!this.isMultipart) {
                    throw this.parameterError(p, "@Part parameters can only be used with multipart encoding.", new Object[0]);
                }

                this.gotPart = true;
                return new ParameterHandler.Part(((com.bytedance.retrofit2.http.Part) annotation).a(), this.retrofit.requestBodyConverter(type, annotations, this.methodAnnotations));
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.PartMap)) {
                if (!this.isMultipart) {
                    throw this.parameterError(p, "@PartMap parameters can only be used with multipart encoding.", new Object[0]);
                }

                this.gotPart = true;
                v0_2 = Utils.getRawType(type);
                if (!Map.class.isAssignableFrom(v0_2)) {
                    throw this.parameterError(p, "@PartMap parameter type must be Map.", new Object[0]);
                }

                v0_5 = Utils.getSupertype(type, v0_2, Map.class);
                if (!(v0_5 instanceof ParameterizedType)) {
                    throw this.parameterError(p, "Map must include generic types (e.g., Map<String, String>)", new Object[0]);
                }

                v1_1 = Utils.getParameterUpperBound(0, ((ParameterizedType) v0_5));
                if (String.class != v1_1) {
                    throw this.parameterError(p, "@PartMap keys must be of type String: " + v1_1, new Object[0]);
                }

                return new ParameterHandler.PartMap(this.retrofit.requestBodyConverter(Utils.getParameterUpperBound(1, ((ParameterizedType) v0_5)), annotations, this.methodAnnotations), ((com.bytedance.retrofit2.http.PartMap) annotation).a());
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.Body)) {
                if (!this.isFormEncoded && !this.isMultipart) {
                    if (this.gotBody) {
                        throw this.parameterError(p, "Multiple @Body method annotations found.", new Object[0]);
                    } else {
                        try {
                            v1_2 = this.retrofit.requestBodyConverter(type, annotations, this.methodAnnotations);
                        } catch (RuntimeException v0_13) {
                            throw this.parameterError(((Throwable) v0_13), p, "Unable to create @Body converter for %s", new Object[]{type});
                        }

                        this.gotBody = true;
                        return new ParameterHandler.Body(this.notNull, v1_2);
                    }
                }

                throw this.parameterError(p, "@Body parameters cannot be used with form or multi-part encoding.", new Object[0]);
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.Method)) {
                if (this.B) {
                    throw this.parameterError(p, "Multiple @Method method annotations found.", new Object[0]);
                }

                this.B = true;
                v1 = ((com.bytedance.retrofit2.http.Method) annotation).a();
                if (!ServiceMethod.PARAM_NAME_REGEX.matcher(((CharSequence) v1)).matches()) {
                    v2_1 = new Object[v2];
                    v2_1[0] = ServiceMethod.PARAM_URL_REGEX.pattern();
                    v2_1[1] = v1;
                    throw this.parameterError(p, "@Method parameter name must match %s. Found: %s", v2_1);
                }

                if (this.D != null && !this.D.equals(v1)) {
                    v2_1 = new Object[v2];
                    v2_1[0] = this.httpMethod;
                    v2_1[1] = v1;
                    throw this.parameterError(p, "Method \"%s\" does not contain \"{%s}\".", v2_1);
                }

                return new ParameterHandler.Method(v1, this.retrofit.stringConverter(type, annotations));
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.MaxLength)) {
                try {
                    v1_2 = this.retrofit.stringConverter(type, annotations);
                } catch (RuntimeException v0_13) {
                    throw this.parameterError(v0_13, p, "Unable to create @MaxLength converter for %s", new Object[]{type});
                }

                return new ParameterHandler.MaxLength(v1_2);
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.AddCommonParam)) {
                try {
                    v1_2 = this.retrofit.stringConverter(type, annotations);
                } catch (RuntimeException v0_13) {
                    throw this.parameterError(v0_13, p, "Unable to create @AddCommonParam converter for %s", new Object[]{type});
                }

                return new ParameterHandler.AddCommonParam(v1_2);
            }

            if ((annotation instanceof com.bytedance.retrofit2.http.ExtraInfo)) {
                try {
                    v1_2 = this.retrofit.toStringConverter(type, annotations);
                } catch (RuntimeException v0_13) {
                    throw this.parameterError(v0_13, p, "Unable to create @ExtraInfo converter for %s", new Object[]{type});
                }

                return new ParameterHandler.ExtraInfo(v1_2);
            }
            v0_3 = null;
            return v0_3;
        }

        private RuntimeException parameterError(Throwable arg3, int arg4, String arg5, Object[] arg6) {
            return this.methodError(arg3, arg5 + " (parameter #" + (arg4 + 1) + ")", arg6);
        }

        final Converter createResponseConverter() {
            Annotation[] annotations = this.method.getAnnotations();
            try {
                Retrofit retrofit = this.retrofit;
                Type responseType = this.responseType;
                Utils.checkNotNull(responseType, "type == null");
                Utils.checkNotNull(annotations, "annotations == null");
                int start = retrofit.converterFactories.indexOf(null) + 1;
                int size = retrofit.converterFactories.size();
                for (int i = start; i < size; ++i) {
                    Converter converter = retrofit.converterFactories.get(i).responseBodyConverter(responseType, annotations);
                    if (converter != null) {
                        return converter;
                    }
                }

                StringBuilder sb = new StringBuilder("Could not locate TypeInput converter for ").append(responseType).append(".\n");
                sb.append("  Tried:");
                int factorySize = retrofit.converterFactories.size();
                while (start < factorySize) {
                    sb.append("\n   * ").append(retrofit.converterFactories.get(start).getClass().getName());
                    ++start;
                }
                throw new IllegalArgumentException(sb.toString());
            } catch (RuntimeException e) {
                throw this.methodError(e, "Unable to create converter for %s", new Object[]{this.responseType});
            }
        }
    }
}

